---
title: Capture and approve case costs
summary: Enter, validate, and persist case cost records with provider lookups.
status: draft
owner: <owner>
last_reviewed: 2026-08-21
operation_id: OP-APP-006
trigger: User saves or deletes a row on frmCaseCost
---

# Capture and approve case costs

This workflow validates and persists case cost entries, using a shared provider-search popup for provider lookups, and recalculates totals after each change.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-APP-006 |
| **Trigger** | User saves, deletes, or edits a row on [frmCaseCost](../../screens/frm-case-cost.md) |
| **Libraries involved** | [SAIF.Presentation.Web.Controls.PopUps.Infragistics111](../../libraries/saif-presentation-web-controls-popups-infragistics111/overview.md), [SAIF.Application.Claim.Legal](../../libraries/saif-application-claim-legal/overview.md), [SAIF.Business.Claim.Legal](../../libraries/saif-business-claim-legal/overview.md) |
| **Screens** | [frmCaseCost](../../screens/frm-case-cost.md) |
| **Inputs** | Case cost row edits, provider selection |
| **Outputs** | Persisted `clsCaseCost` / `clsCaseCostCollection` records; recalculated case-cost history and totals |

## Steps

1. [SAIF.Presentation.Web.Controls.PopUps.Infragistics111](../../libraries/saif-presentation-web-controls-popups-infragistics111/overview.md) supports provider-search popup behavior used by the case-cost screen (`doSelectProvPopup()`).
2. `clsCaseCostManager` handles [frmCaseCost](../../screens/frm-case-cost.md), validates provider input, and manages row-level dirty-state checks — owned by [SAIF.Application.Claim.Legal](../../libraries/saif-application-claim-legal/overview.md).
3. [SAIF.Business.Claim.Legal](../../libraries/saif-business-claim-legal/overview.md) persists `clsCaseCost` and `clsCaseCostCollection` records ([CASE_COST](../../libraries/saif-business-claim-legal/database-tables.md#case_cost)).
4. `SAIF.Application.Claim.Legal` reloads the case-cost history grid and recalculates totals after save or delete.

## Process flow

The following diagram visualizes this workflow across components.

```mermaid
flowchart TD
	Start([User edits case cost row on frmCaseCost]) --> S1[Provider popup selects provider]
	S1 --> S2[clsCaseCostManager validates provider input and row dirty state]
	S2 --> S3[SAIF.Business.Claim.Legal persists case cost record]
	S3 --> S4[Case-cost history grid reloaded and totals recalculated]
	S4 --> EndOk([Case cost saved])
```

## Failure and edge-case behavior

- Invalid provider selection: row-level validation blocks the save until a valid provider is selected.*

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [Data model](../data-model.md)

> **Note:** Statements marked with `*` were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts. Statements
> marked with `**` could not be confirmed; treat as unknown until verified.

## Sources
- `SAIF.Application.Claim.Legal/LegalNet/clsCaseCostManager.vb`
- `SAIF.Presentation.Web.Controls.PopUps.Infragistics111/AddressPopUp.vb`
